home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tex / macros / source / contrib / stmaryrd / stmaryaj.mf < prev    next >
Text File  |  1995-03-09  |  40KB  |  1,067 lines

  1. %%% ====================================================================
  2. %%%  @METAFONT-file{
  3. %%%     author-1        = "Jeremy Gibbons",
  4. %%%     author-2        = "Alan Jeffrey",
  5. %%%     version         = "1.1",
  6. %%%     date            = "02 June 1992",
  7. %%%     time            = "15:06:36 BST",
  8. %%%     filename        = "stmaryaj.mf",
  9. %%%     address-1       = "Department of Computer Science
  10. %%%                        University of Aukland
  11. %%%                        Private Bag
  12. %%%                        Aukland
  13. %%%                        New Zealand",
  14. %%%     address-2       = "School of Cognitive and Computing Sciences
  15. %%%                        University of Sussex
  16. %%%                        Brighton BN1 9QH
  17. %%%                        UK",
  18. %%%     telephone-1     = "+64 9 373 7599 x 5120",
  19. %%%     telephone-2     = "+44 273 606755 x 3238",
  20. %%%     FAX-1           = "+64 9 373 7453",
  21. %%%     FAX-2           = "+44 273 678188",
  22. %%%     checksum        = "16420 1066 3686 40419",
  23. %%%     email-1         = "jeremy@cs.aukuni.ac.nz",
  24. %%%     email-2         = "alanje@cogs.sussex.ac.uk",
  25. %%%     codetable       = "ISO/ASCII",
  26. %%%     keywords        = "metafont symbols math fonts",
  27. %%%     supported       = "yes",
  28. %%%     abstract        = "This is part of the metafont program for
  29. %%%                        the St Mary's Road symbol font.",
  30. %%%     docstring       = "This is part of the metafont program for
  31. %%%                        the St Mary's Road symbol font.  The font
  32. %%%                        contains a number of mathematical
  33. %%%                        characters which are not present in the
  34. %%%                        standard TeX and AMS symbol fonts.
  35. %%%
  36. %%%                        It is described in stmaryrd.tex.
  37. %%%
  38. %%%                        Copyright 1992 Jeremy Gibbons and Alan Jeffrey.
  39. %%%
  40. %%%                        The checksum field above contains a CRC-16
  41. %%%                        checksum as the first value, followed by the
  42. %%%                        equivalent of the standard UNIX wc (word
  43. %%%                        count) utility output of lines, words, and
  44. %%%                        characters.  This is produced by Robert
  45. %%%                        Solovay's checksum utility.",
  46. %%%     package         = "St Mary's Road",
  47. %%%     dependencies    = "none",
  48. %%%  }
  49. %%% ====================================================================
  50. %%%
  51. %%% 20 May 1991, v1.0: Created the font out of alans.mf and galileo.mf.
  52. %%%
  53. %%% 24 May 1991, v1.01: Finished the first version.
  54. %%%
  55. %%% 25 Jun 1991, v1.02: Corrected bugs with arrow_not and Arrow_not.
  56. %%%
  57. %%% 2 Jun 1992, v1.1: added the headers.
  58.  
  59. iff known left_right_arrow_eq:
  60. cmchar "Left and right arrow equality";
  61. compute_spread(.45x_height#,.55x_height#);
  62. beginchar(left_right_arrow_eq,14u#,v_center(spread#+.96asc_height#));
  63. adjust_fit(0,0); pickup crisp.nib; pos1(rule_thickness,90);
  64. pos2(rule_thickness,90); pos3(bar,0); pos4(bar,0);
  65. y0=y1=y2=math_axis; x1=.5w; rt
  66. x0=hround(w-.75u); y3-y0=y0-y4=.24asc_height+eps;
  67. x3=x4=x0-3u-eps; pos5(bar,angle(z4-z0)); z5l=z0;
  68. pos6(bar,angle(z3-z0)); z6l=z0; z9=.381966[.5[z3,z4],z0];
  69. numeric t; path p; p=z4l{z9-z4}..z6r; t=xpart(p
  70. intersectiontimes((0,y2l)--(w,y2l))); x2=xpart point t of p;
  71. path p; p=z0..{z4-z9}z4r--subpath (0,t)
  72. of\\(z4l{z9-z4}..z6r)
  73.  --z2l---z1l..z1r---z2r--subpath (t,0) of\\(z3l{z9-z3}..z5r)
  74.  --z3r{z9-z3}..z0 & cycle;  % arrowhead and stem
  75. p:=p shifted (0,.5spread); filldraw p; % top
  76. addto currentpicture also currentpicture xscaled -1 shifted (w,0);
  77. pickup rule.nib;
  78. lft x10=hround u; x11=w-x10; y10=y11=math_axis-.5spread;
  79. draw z10--z11;  % bottom
  80. penlabels(0,1,2,3,4,5,6,9,10,11); endchar;
  81.  
  82. iff known curly_vee_down_arrow:
  83. cmchar "Upside-down upwards accumulate symbol";
  84. beginchar(curly_vee_down_arrow,12u#,asc_height#,asc_depth#);
  85. adjust_fit(0,0); pickup rule.nib;
  86. x2=good.x .5w; w:=r:=2x2;
  87. lft x1=0; x3=w-x1;
  88. bot y1=-d; top y2=h+o; y3=y1;
  89. x4=x2; y4=h-(x_height+d);
  90. pickup crisp.nib;
  91. pos11(rule_thickness,0); pos12(rule_thickness,0);     % arrow head nicked from
  92. pos13(bar,90); pos14(bar,90);                         % up_arrow
  93. lft x11l=hround(.5w-.5rule_thickness); y11-.5rule_thickness=-d;
  94. x10=x11=x12; top y10=top y2; x10-x13=x14-x10=3u+eps;
  95. y13=y14=y10-.24asc_height-eps;
  96. pos15(bar,angle(z14-z10)); z15l=z10;
  97. pos16(bar,angle(z13-z10)); z16l=z10;
  98. z19=.381966[.5[z13,z14],z10];
  99. numeric t; path p; p=z14l{z19-z14}..z16r;
  100. t=xpart(p intersectiontimes((x12r,-d)--(x12r,h))); y12=ypart point t of p;
  101. filldraw z10..{z14-z19}z14r--subpath (0,t) of\\(z14l{z19-z14}..z16r)
  102.  --z12r
  103.  -- % ---z11r..z11l---
  104.  z12l--subpath (t,0) of\\(z13l{z19-z13}..z15r)
  105.  --z13r{z19-z13}..z10 & cycle;  % arrowhead
  106. pickup rule.nib;
  107. numeric t; path p; p=z1{z4-z1}..{up}z2;
  108. t=xpart(p intersectiontimes((0,y12)--(w,y12)));
  109. draw subpath (0,t) of\\(z1{z4-z1}..{up}z2);  % left arm
  110. draw subpath (0,t) of\\(z3{z4-z3}..{up}z2);  % right arm
  111. currentpicture:= currentpicture yscaled -1 shifted (0,h-d);
  112. endchar;
  113.  
  114. iff known curly_vee_up_arrow:
  115. cmchar "Upside-down downwards accumulate symbol";
  116. beginchar(curly_vee_up_arrow,12u#,asc_height#,asc_depth#);
  117. adjust_fit(0,0); pickup rule.nib;
  118. x2=good.x .5w; w:=r:=2x2;
  119. lft x1=0; x3=w-x1;
  120. bot y1=-d; top y2=h+o; y3=y1;
  121. x4=x2; y4=h-(x_height+d);
  122. pickup crisp.nib;
  123. numeric theta,delta; theta=angle(z4-z1); delta=3u++.24asc_height;
  124. pos11(rule_thickness,-90+theta); pos12(rule_thickness,-90+theta);
  125. pos13(bar,-180+theta); pos14(bar,-180+theta);
  126. lft x10=0; bot y10=-d;
  127. x11=w; z11=z10+whatever*(dir theta);  % where the arrow stem would go
  128. y13a=y10; x14a=x10; x13a-x10=y14a-y10=delta+eps;
  129. z13=z13a rotatedaround(z10,theta-45);
  130. z14=z14a rotatedaround(z10,theta-45);
  131. pos15(bar,theta+45); z15l=z10; pos16(bar,theta-45); z16l=z10;
  132. z19=.381966[.5[z13,z14],z10];
  133. numeric t; path p; p=z14l{z19-z14}..z16r;
  134. t=xpart(p intersectiontimes (z11l--(z11l+2(z10-z11)))); z12l=point t of p;
  135. filldraw z10..{z14-z19}z14r
  136.  --subpath (0,t) of\\(z14l{z19-z14}..z16r)
  137.  --z12l
  138.  -- % ---z11l..z11r---
  139.  z12r
  140.  --subpath (t,0) of\\(z13l{z19-z13}..z15r)
  141.  --z13r{z19-z13}..z10 & cycle;  % left arrowhead
  142. numeric theta,delta; theta=angle(z3-z4); delta=3u++.24asc_height;
  143. pos21(rule_thickness,90+theta); pos22(rule_thickness,90+theta);
  144. pos23(bar,theta); pos24(bar,theta);
  145. rt x20=w; bot y20=-d;
  146. x21=0; z21=z20+whatever*-(dir theta);  % where the arrow stem would go
  147. x23a=x20; y24a=y20; y23a-y20=x20-x24a=delta+eps;
  148. z23=z23a rotatedaround(z20,theta+45);
  149. z24=z24a rotatedaround(z20,theta+45);
  150. pos25(bar,theta+225); z25l=z20; pos26(bar,theta+135); z26l=z20;
  151. z29=.381966[.5[z23,z24],z20];
  152. numeric t; path p; p=z24l{z29-z24}..z26r;
  153. t=xpart(p intersectiontimes (z21l--(z21l+2(z20-z21)))); z22l=point t of p;
  154. filldraw z20..{z24-z29}z24r
  155.  --subpath (0,t) of\\(z24l{z29-z24}..z26r)
  156.  --z22l
  157.  -- % ---z21l..z21r---
  158.  z22r
  159.  --subpath (t,0) of\\(z23l{z29-z23}..z25r)
  160.  --z23r{z29-z23}..z20 & cycle;  % right arrowhead
  161. pickup rule.nib;
  162. numeric t; path p; p=z2{down}..{z1-z4}z1;
  163. t=xpart(p intersectiontimes(z12l--z12r));
  164. draw subpath (0,t) of\\(z2{down}..{z1-z4}z1);  % left arm
  165. draw subpath (0,t) of\\(z2{down}..{z3-z4}z3);  % right arm
  166. currentpicture:= currentpicture yscaled -1 shifted (0,h-d);
  167. endchar;
  168.  
  169. iff known nnw_arrow: cmchar "Northnorthwest arrow";
  170. beginchar(nnw_arrow,11u#,asc_height#,asc_depth#);
  171. adjust_fit(0,0); pickup crisp.nib;
  172. x1+.5rule_thickness=hround(w-u); lft x0=hround 3u;  % This 3u used to be a u in
  173. y1+.5rule_thickness=h; bot y0=-d;                   % the program for swarrow.
  174.                                                     % 3u (with width 11u) gives
  175.                                                     % arrow parallel to langle.
  176. numeric theta,delta; theta=angle(z1-z0); delta=3u++.24asc_height;
  177. if abs(theta-45)<2.5: theta:=45; y1:=y0+x1-x0; fi % near-45$^\circ$ angle
  178. pos1(rule_thickness,-90+theta); pos2(rule_thickness,-90+theta);
  179. pos3(bar,-180+theta); pos4(bar,-180+theta);
  180.     %y3=y0; x4=x0; x3-x0=y4-y0=delta+eps;
  181. y10=y0; x11=x0; x10-x0=y11-y0=delta+eps;   % Can now do arrows of any angle
  182. z3=z10 rotatedaround(z0,theta-45);
  183. z4=z11 rotatedaround(z0,theta-45);
  184. pos5(bar,theta+45); z5l=z0; pos6(bar,theta-45); z6l=z0;
  185. z9=.381966[.5[z3,z4],z0];
  186. numeric t; path p; p=z4l{z9-z4}..z6r;
  187. t=xpart(p intersectiontimes (z1l--(z1l+2(z0-z1)))); z2l=point t of p;
  188. filldraw z0..{z4-z9}z4r
  189.  --subpath (0,t) of\\(z4l{z9-z4}..z6r)
  190.  --z2l---z1l..z1r---z2r
  191.  --subpath (t,0) of\\(z3l{z9-z3}..z5r)
  192.  --z3r{z9-z3}..z0 & cycle;  % arrowhead and stem
  193. currentpicture:= currentpicture yscaled -1 shifted (0,h-d);
  194. endchar;
  195.  
  196. iff known nne_arrow: cmchar "Northnortheast arrow";
  197. beginchar(nne_arrow,11u#,asc_height#,asc_depth#);
  198. adjust_fit(0,0); pickup crisp.nib;
  199. x1-.5rule_thickness=hround u; rt x0=hround(w-3u);
  200. y1+.5rule_thickness=h; bot y0=-d;
  201. numeric theta,delta; theta=angle(z0-z1); delta=3u++.24asc_height;
  202. if abs(theta+45)<2.5: theta:=-45; y1:=y0+x0-x1; fi % near-45$^\circ$ angle
  203. pos1(rule_thickness,90+theta); pos2(rule_thickness,90+theta);
  204. pos3(bar,theta); pos4(bar,theta);
  205.    %x3=x0; y4=y0; y3-y0=x0-x4=delta+eps;
  206. x10=x0; y11=y0; y10-y0=x0-x11=delta+eps;
  207. z3=z10 rotatedaround(z0,theta+45);
  208. z4=z11 rotatedaround(z0,theta+45);
  209. pos5(bar,theta+225); z5l=z0; pos6(bar,theta+135); z6l=z0;
  210. z9=.381966[.5[z3,z4],z0];
  211. numeric t; path p; p=z4l{z9-z4}..z6r;
  212. t=xpart(p intersectiontimes (z1l--(z1l+2(z0-z1)))); z2l=point t of p;
  213. filldraw z0..{z4-z9}z4r
  214.  --subpath (0,t) of\\(z4l{z9-z4}..z6r)
  215.  --z2l---z1l..z1r---z2r
  216.  --subpath (t,0) of\\(z3l{z9-z3}..z5r)
  217.  --z3r{z9-z3}..z0 & cycle;  % arrowhead and stem
  218. currentpicture:= currentpicture yscaled -1 shifted (0,h-d);
  219. endchar;
  220.  
  221. iff known left_slice: cmchar "Left slice";
  222. beginarithchar(left_slice); pickup rule.nib; autorounded;
  223. lft x6=hround u; x2=w-x6; y2=math_axis; y8-y2 = .5(x2-x6);
  224. circle_points;    % circle
  225. draw z1--z6--z3;  % lessthan
  226. draw z1..z2..z3;  % arc
  227. labels(1,2,3,4,5,6,7,8); endchar;
  228.  
  229. iff known right_slice: cmchar "Right slice";
  230. beginarithchar(right_slice); pickup rule.nib; autorounded;
  231. lft x6=hround u; x2=w-x6; y2=math_axis; y8-y2 = .5(x2-x6);
  232. circle_points;    % circle
  233. draw z5--z2--z7;  % greaterthan
  234. draw z5..z6..z7;  % arc
  235. labels(1,2,3,4,5,6,7,8); endchar;
  236.  
  237. iff known var_o_less_than: cmchar "Circular circle-lessthan operator";
  238. begincircle(var_o_less_than);
  239. draw z1--z6--z3;  % lessthan
  240. labels(1,2,3,4,5,6,7,8); endchar;
  241.  
  242. iff known var_o_greater_than: cmchar "Circular circle-greaterthan operator";
  243. begincircle(var_o_greater_than);
  244. draw z5--z2--z7;  % greaterthan
  245. labels(1,2,3,4,5,6,7,8); endchar;
  246.  
  247. iff known var_o_vee: cmchar "Circular circle-vee operator";
  248. begincircle(var_o_vee);
  249. draw z1--z4--z7;  % vee
  250. labels(1,2,3,4,5,6,7,8); endchar;
  251.  
  252. iff known var_o_wedge: cmchar "Circular circle-wedge operator";
  253. begincircle(var_o_wedge);
  254. draw z3--z8--z5;  % wedge
  255. labels(1,2,3,4,5,6,7,8); endchar;
  256.  
  257. iff known tall_oblong: cmchar "Tall oblong (Dijkstra choice symbol)";
  258. beginchar(tall_oblong,9u#,body_height#,paren_depth#);
  259. adjust_fit(0,0); pickup rule.nib;
  260. x1=x2; top y1=h; .5[y1,y2]=math_axis;
  261. x3=x4=w-x1; y3=y1; y4=y2;
  262. compute_spread(.45x_height#,.55x_height#); x3-x1=spread;
  263. draw z1--z2--z4--z3--cycle;  % stems
  264. labels(1,2,3,4); endchar;
  265.  
  266. iff known interleave:
  267. cmchar "Triple vertical line (interleaving)";
  268. beginchar(interleave,12.5u#,body_height#,paren_depth#);
  269. adjust_fit(0,0); pickup rule.nib;
  270. compute_spread(.45x_height#,.55x_height#);
  271. x1=x2; top y1=h; .5[y1,y2]=math_axis;
  272. x4=x3; x5=x6=w-x1; y5=y3=y1; y6=y4=y2;
  273. x3-x1=x5-x3=hround spread;
  274. draw z1--z2; draw z3--z4; draw z5--z6;  % stems
  275. labels(1,2,3,4,5,6); endchar;
  276.  
  277. iff known o_bar: cmchar "Circle-bar operator";
  278. beginarithchar(o_bar); pickup light_rule.nib; autorounded;
  279. lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
  280. circle_points; draw_circle;  % circle
  281. draw z4--z8;  % bar
  282. labels(1,2,3,4,5,6,7,8); endchar;
  283.  
  284. iff known o_bslash: cmchar "Circle-backslash operator";
  285. beginarithchar(o_bslash); pickup light_rule.nib; autorounded;
  286. lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
  287. circle_points; draw_circle;  % circle
  288. draw z3--z7;  % diagonal
  289. labels(1,2,3,4,5,6,7,8); endchar;
  290.  
  291. iff known o_less_than: cmchar "Circle-lessthan operator";
  292. beginarithchar(o_less_than); pickup light_rule.nib; autorounded;
  293. lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
  294. circle_points; draw_circle;  % circle
  295. draw z1--z6--z3;  % lessthan
  296. labels(1,2,3,4,5,6,7,8); endchar;
  297.  
  298. iff known o_greater_than: cmchar "Circle-greaterthan operator";
  299. beginarithchar(o_greater_than); pickup light_rule.nib; autorounded;
  300. lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
  301. circle_points; draw_circle;  % circle
  302. draw z5--z2--z7;  % greaterthan
  303. labels(1,2,3,4,5,6,7,8); endchar;
  304.  
  305. iff known o_vee: cmchar "Circle-vee operator";
  306. beginarithchar(o_vee); pickup light_rule.nib; autorounded;
  307. lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
  308. circle_points; draw_circle;  % circle
  309. draw z1--z4--z7;  % vee
  310. labels(1,2,3,4,5,6,7,8); endchar;
  311.  
  312. iff known o_wedge: cmchar "Circle-wedge operator";
  313. beginarithchar(o_wedge); pickup light_rule.nib; autorounded;
  314. lft x6=hround u; x2=w-x6; y2=math_axis; top y8=h;
  315. circle_points; draw_circle;  % circle
  316. draw z3--z8--z5;  % wedge
  317. labels(1,2,3,4,5,6,7,8); endchar;
  318.  
  319. iff known oblong:
  320. cmchar "Oblong (Hoare choice)";
  321. beginchar(oblong,12u#,.8asc_height#,0);
  322. adjust_fit(0,0); pickup rule.nib;
  323. lft x1=hround 1.1u; x2=x1; x4=x5=w-x1;
  324. y1=good.y h+o; bot y2=0; y4=y2; y5=y1;
  325. draw z1---z2---z4---z5--cycle;  % stems and bar
  326. labels(1,2,4,5); endchar;
  327.  
  328. iff known in_plus: cmchar "Bag element sign";
  329. compute_spread(5/4x_height#,3/2x_height#);
  330. beginchar(in_plus,12u#,v_center(spread#+rule_thickness#));
  331. italcorr h#*slant-u#;
  332. adjust_fit(0,0); pickup rule.nib; autorounded;
  333. lft x2=hround 1.5u-eps; x1=x3=x6=w-x2;
  334. y1-y3=spread; y2=y6=.5[y1,y3]=math_axis;
  335. x4=x5=.5w+u; y4=y1; y5=y3;
  336. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  337. draw z2--z6;  % middle bar
  338. x12=x13=.47[x1,x2]; y12=y1-3rule_thickness+eps; y13=y3+3rule_thickness+eps;
  339. draw z12--z13; % vertical bar
  340. labels(1,2,3,4,5,6,12,13); endchar;
  341.  
  342. iff known ni_plus: cmchar "Reversed bag element sign";
  343. compute_spread(5/4x_height#,3/2x_height#);
  344. beginchar(ni_plus,12u#,v_center(spread#+rule_thickness#));
  345. italcorr h#*slant-u#;
  346. adjust_fit(0,0); pickup rule.nib; autorounded;
  347. lft x1=hround 1.5u-eps; x1=x3=x6=w-x2;
  348. y1-y3=spread; y2=y6=.5[y1,y3]=math_axis;
  349. x4=x5=.5w-u; y4=y1; y5=y3;
  350. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  351. draw z2--z6;  % middle bar
  352. x12=x13=.47[x1,x2]; y12=y1-3rule_thickness+eps; y13=y3+3rule_thickness+eps;
  353. draw z12--z13; % vertical bar
  354. labels(1,2,3,4,5,6,12,13); endchar;
  355.  
  356. iff known n_plus: cmchar "Bag intersection";
  357. beginchar(n_plus,12u#,.8asc_height#,0);
  358. italcorr .8asc_height#*slant-.5u#;
  359. adjust_fit(0,0); pickup rule.nib; autorounded;
  360. lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
  361. y3=good.y h+o; bot y1=-o; y2=y4=2/3[y1,y3]; y5=y1;
  362. draw z1---z2...z3...z4---z5;  % stems and cap
  363. y8=y9=.47[y1,y3]; x8=w-x9=x1+2rule_thickness+eps;
  364. x6=x7=x3; .5[y6,y7]=y8; y7-y6=x9-x8;
  365. draw z6--z7; draw z8--z9;  % enclosed plus sign
  366. labels(1,2,3,4,5,6,7,8,9); endchar;
  367.  
  368. iff known sub_set_plus: cmchar "Proper subbag sign";
  369. compute_spread(5/4x_height#,3/2x_height#);
  370. beginchar(sub_set_plus,14u#,v_center(spread#+rule_thickness#));
  371. italcorr h#*slant-u#;
  372. adjust_fit(0,0); pickup rule.nib; autorounded;
  373. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  374. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  375. x4=x5=.5w; y4=y1; y5=y3;
  376. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  377. x12=x13=.40[x1,x2]; y12=y1-3rule_thickness+eps; y13=y3+3rule_thickness+eps;
  378. y10=y11=y2; .5[x10,x11]=x12; x11-x10=y12-y13;
  379. draw z12--z13; draw z10--z11;  % enclosed plus sign
  380. labels(1,2,3,4,5,10,11,12,13); endchar;
  381.  
  382. iff known sup_set_plus: cmchar "Proper superbag sign";
  383. compute_spread(5/4x_height#,3/2x_height#);
  384. beginchar(sup_set_plus,14u#,v_center(spread#+rule_thickness#));
  385. italcorr h#*slant-u#;
  386. adjust_fit(0,0); pickup rule.nib; autorounded;
  387. lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
  388. y1-y3=spread; y2=.5[y1,y3]=math_axis;
  389. x4=x5=.5w; y4=y1; y5=y3;
  390. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  391. x12=x13=.40[x1,x2]; y12=y1-3rule_thickness+eps; y13=y3+3rule_thickness+eps;
  392. y10=y11=y2; .5[x10,x11]=x12; x11-x10=y12-y13;
  393. draw z12--z13; draw z10--z11;  % enclosed plus sign
  394. labels(1,2,3,4,5,10,11,12,13); endchar;
  395.  
  396. iff known sub_set_plus_eq: cmchar "Subbag or equal to sign";
  397. compute_spread(.45x_height#,.55x_height#);
  398. spread#':=spread#; spread':=spread; % the spread of `$=$'
  399. compute_spread(5/4x_height#,3/2x_height#);
  400. beginchar(sub_set_plus_eq,14u#,v_center(spread#'+spread#+rule_thickness#));
  401. adjust_fit(0,0); pickup rule.nib; autorounded;
  402. lft x2=hround 1.5u-eps; x1=x3=w-x2;
  403. y1-y3=spread; y2=.5[y1,y3]; top y1=h;
  404. x4=x5=.5w; y4=y1; y5=y3;
  405. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  406. x8=x1; lft x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % lower bar
  407. x12=x13=.40[x1,x2]; y12=y1-3rule_thickness+eps; y13=y3+3rule_thickness+eps;
  408. y10=y11=y2; .5[x10,x11]=x12; x11-x10=y12-y13;
  409. draw z12--z13; draw z10--z11;  % enclosed plus sign
  410. labels(1,2,3,4,5,7,8,10,11,12,13); endchar;
  411.  
  412. iff known sup_set_plus_eq: cmchar "Superbag or equal to sign";
  413. compute_spread(.45x_height#,.55x_height#);
  414. spread#':=spread#; spread':=spread; % the spread of `$=$'
  415. compute_spread(5/4x_height#,3/2x_height#);
  416. beginchar(sup_set_plus_eq,14u#,v_center(spread#'+spread#+rule_thickness#));
  417. adjust_fit(0,0); pickup rule.nib; autorounded;
  418. lft x1=hround 1.5u-eps; x2=w-x1; x3=x1;
  419. y1-y3=spread; y2=.5[y1,y3]; top y1=h;
  420. x4=x5=.5w; y4=y1; y5=y3;
  421. draw z1---z4...z2{down}...z5---z3;  % arc and bars
  422. x8=x1; rt x9=x2; y8=y9; y3-y9=spread'; draw z8--z9;  % lower bar
  423. x12=x13=.40[x1,x2]; y12=y1-3rule_thickness+eps; y13=y3+3rule_thickness+eps;
  424. y10=y11=y2; .5[x10,x11]=x12; x11-x10=y12-y13;
  425. draw z12--z13; draw z10--z11;  % enclosed plus sign
  426. labels(1,2,3,4,5,7,8,10,11,12,13); endchar;
  427.  
  428. iff known L_bag: cmchar "Left bag bracket";
  429. beginchar(L_bag,8u#,body_height#,paren_depth#);
  430.       % ht and dp from "left parenthesis" symbol
  431. adjust_fit(0,0); pickup fine.nib;
  432. pos0(hair,180); pos1(vair,90); pos2(hair,0);
  433. pos3(cap_stem,0); pos4(vair,90); pos5(flare,180);
  434. lft x0r=lft x3l=lft x5r=hround u; y0=h-2u;
  435. x1=1/2[x0,x2]; top y1r=h;
  436. x2=2/3[x0,x4]; y2=y0;
  437. y3=0;
  438. x4=w-x0r; bot y4l=-d;
  439. filldraw stroke z1e{right}..z2e{down}..z3e{down}..{right}z4e; % arc
  440. bulb(1,0,5);
  441. penlabels(0,1,2,3,4,5); endchar;
  442.  
  443. iff known R_bag: cmchar "Right bag bracket";
  444. beginchar(R_bag,8u#,body_height#,paren_depth#);
  445.       % ht and dp from "left parenthesis" symbol
  446. adjust_fit(0,0); pickup fine.nib;
  447. pos0(hair,180); pos1(vair,90); pos2(hair,0);
  448. pos3(cap_stem,0); pos4(vair,90); pos5(flare,180);
  449. lft x0r=lft x3l=lft x5r=hround u; y0=h-2u;
  450. x1=1/2[x0,x2]; top y1r=h;
  451. x2=2/3[x0,x4]; y2=y0;
  452. y3=0;
  453. x4=w-x0r; bot y4l=-d;
  454. filldraw stroke z1e{right}..z2e{down}..z3e{down}..{right}z4e; % arc
  455. bulb(1,0,5);
  456. currentpicture:= currentpicture xscaled -1 shifted (w,0);  % OK, so sue me!
  457. endchar;
  458.  
  459. iff known ll_bracket:
  460. cmchar "Left semantic bracket [[";
  461. beginchar(ll_bracket,7.25u#,body_height#,paren_depth#);
  462. adjust_fit(0,0);
  463. pickup crisp.nib; pos1(rule_thickness,0); pos2(rule_thickness,0);
  464. top y1=h; bot y2=-d; lft x1l=lft x2l=hround(2.5u-.5rule_thickness)-1-eps;
  465. filldraw stroke z1e--z2e;  % left stem
  466. pos7(rule_thickness,0); pos8(rule_thickness,0);
  467. top y7=h; bot y8=-d; lft x7l=lft x8l=hround(4.75u-.5rule_thickness)-1-eps;
  468. filldraw stroke z7e--z8e;  % right stem
  469. pos3(rule_thickness,90); pos4(rule_thickness,90);
  470. pos5(rule_thickness,90); pos6(rule_thickness,90);
  471. x3=x5=x1l; rt x4=rt x6=ceiling(w-.4u)+eps; y3r=y4r=y1; y5l=y6l=y2;
  472. filldraw stroke z3e--z4e;  % upper bar
  473. filldraw stroke z5e--z6e;  % lower bar
  474. penlabels(1,2,3,4,5,6,7,8); endchar;
  475.  
  476. iff known rr_bracket:
  477. cmchar "Right semantic bracket ]]";
  478. beginchar(rr_bracket,7.25u#,body_height#,paren_depth#);
  479. adjust_fit(0,0);
  480. pickup crisp.nib; pos1(rule_thickness,0); pos2(rule_thickness,0);
  481. top y1=h; bot y2=-d; rt x1r=rt x2r=hround(w-2.5u+.5rule_thickness)+1+eps;
  482. filldraw stroke z1e--z2e;  % left stem
  483. pos7(rule_thickness,0); pos8(rule_thickness,0);
  484. top y7=h; bot y8=-d; rt x7r=rt x8r=hround(w-4.75u+.5rule_thickness)+1+eps;
  485. filldraw stroke z7e--z8e;  % right stem
  486. pos3(rule_thickness,90); pos4(rule_thickness,90);
  487. pos5(rule_thickness,90); pos6(rule_thickness,90);
  488. x3=x5=x1l; lft x4=lft x6=ceiling(.4u)-eps; y3r=y4r=y1; y5l=y6l=y2;
  489. filldraw stroke z3e--z4e;  % upper bar
  490. filldraw stroke z5e--z6e;  % lower bar
  491. penlabels(1,2,3,4,5,6,7,8); endchar;
  492.  
  493. iff known ll_parenthesis:
  494. cmchar "Left relational image (|";
  495. beginchar(ll_parenthesis,7u#,body_height#,paren_depth#);
  496. italcorr body_height#*slant-.5u#;
  497. adjust_fit(0,0); pickup fine.nib;
  498. pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0);
  499. rt x1r=rt x3r=hround(w-u); lft x2l=hround(x1-4u);
  500. top y1=h; y2=.5[y1,y3]=math_axis;
  501. filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e
  502.  ...{3(x3e-x2e),y3-y2}z3e;  % arc
  503. pos4(whatever,45); pos5(whatever,-45);
  504. rt x4r-lft x4l=rt x5r-lft x5l=rule_thickness;
  505. z4r=z1r; z5r=z3r;
  506. filldraw stroke z4e--z5e;
  507. penlabels(1,2,3,4,5); endchar;
  508.  
  509. iff known rr_parenthesis:
  510. cmchar "Right relational image |)";
  511. beginchar(rr_parenthesis,7u#,body_height#,paren_depth#);
  512. italcorr math_axis#*slant-.5u#;
  513. adjust_fit(0,0); pickup fine.nib;
  514. pos1(vair,0); pos2(.75[hair,stem],0); pos3(vair,0);
  515. lft x1l=lft x3l=hround u; rt x2r=hround(x1+4u);
  516. top y1=h; y2=.5[y1,y3]=math_axis;
  517. filldraw stroke z1e{3(x2e-x1e),y2-y1}...z2e
  518.  ...{3(x3e-x2e),y3-y2}z3e;  % arc
  519. pos4(whatever,-45); pos5(whatever,45);
  520. rt x4r-lft x4l=rt x5r-lft x5l=rule_thickness;
  521. z4l=z1l; z5l=z3l;
  522. filldraw stroke z4e--z5e;
  523. penlabels(1,2,3,4,5); endchar;
  524.  
  525. iff known bin_ampersand:
  526. cmchar "Binary operator ampersand (for linear logic)";
  527. beginarithchar(bin_ampersand); pickup rule.nib; autorounded;
  528. rt x1=hround(w-u)+eps; y1=.5[y2,y5]=math_axis;
  529. x2=.25[x3,x1]; y5-y2=x1-x3;
  530. lft x3=hround u-eps; y3=.45[y2,y1];
  531. x5=.5[x3,x1]; x6=x1; y6=y2+o;
  532. z4=whatever[z2,z5]; z4=z6+whatever*dir 140;
  533. draw z1..z2{left}..z3{up}..z4..tension .85..z5{left}..tension .75..z4---z6;
  534. labels(1,2,3,4,5,6);
  535. endchar;
  536.  
  537. iff known bin_dnasrepma:
  538. cmchar "Binary operator dnasrepma (for linear logic)";
  539. beginarithchar(bin_dnasrepma); pickup rule.nib; autorounded;
  540. rt x1=hround(w-u)+eps; y1=.5[y2,y5]=math_axis;
  541. x2=.25[x3,x1]; y5-y2=x1-x3;
  542. lft x3=hround u-eps; y3=.45[y2,y1];
  543. x5=.5[x3,x1]; x6=x1; y6=y2+o;
  544. z4=whatever[z2,z5]; z4=z6+whatever*dir 140;
  545. draw z1..z2{left}..z3{up}..z4..tension .85..z5{left}..tension .75..z4---z6;
  546. currentpicture:= currentpicture scaled -1 shifted (w,h-d);
  547. endchar;
  548.  
  549. iff known triangle_left_eq_slant:
  550. cmchar "Triangular less than or (slanted) equal sign";
  551. compute_spread(.45x_height#,.55x_height#);
  552. spread#':=spread#; spread':=spread;
  553. compute_spread(5/4x_height#,3/2x_height#);
  554. beginchar(triangle_left_eq_slant,14u#,
  555.    v_center(spread#'+spread#+rule_thickness#));
  556. italcorr h#*slant-u#; adjust_fit(0,0); pickup rule.nib;
  557. lft x2=hround 1.5u-eps; x1=x3=w-x2; y1-y3=spread;
  558. y2=.5[y1,y3]; y3-y8=y2-y9=spread'; top y1=h;
  559. x2=x9; x1=x8;
  560. draw z1--z2--z3--cycle;  % diagonals
  561. draw z8--z9; % equal sign
  562. penlabels(1,2,3,8,9); endchar;
  563.  
  564. iff known triangle_right_eq_slant:
  565. cmchar "Triangular greater than or (slanted) equal sign";
  566. compute_spread(.45x_height#,.55x_height#);
  567. spread#':=spread#; spread':=spread;
  568. compute_spread(5/4x_height#,3/2x_height#);
  569. beginchar(triangle_right_eq_slant,14u#,
  570.    v_center(spread#'+spread#+rule_thickness#));
  571. italcorr h#*slant-u#; adjust_fit(0,0); pickup rule.nib;
  572. rt x2=hround(w-1.5u)+eps; x1=x3=w-x2; y1-y3=spread;
  573. x2=x9; x1=x8;
  574. y2=.5[y1,y3]; y3-y8=y2-y9=spread'; top y1=h;
  575. draw z1--z2--z3--cycle;  % diagonals
  576. draw z8--z9;
  577. penlabels(1,2,3,8,9); endchar;
  578.  
  579. iff known n_triangle_left_eq_slant:
  580. cmchar "Not triangular less than or (slanted) equal sign";
  581. compute_spread(.45x_height#,.55x_height#);
  582. spread#':=spread#; spread':=spread;
  583. compute_spread(5/4x_height#,3/2x_height#);
  584. beginchar(n_triangle_left_eq_slant,14u#,
  585.    v_center(spread#'+spread#+rule_thickness#+6u#));
  586. italcorr h#*slant-u#; adjust_fit(0,0); pickup rule.nib;
  587. lft x2=hround 1.5u-eps; x1=x3=w-x2; y1-y3=spread;
  588. y2=.5[y1,y3]; y3-y8=y2-y9=spread'; top y1=h-3u;
  589. x2=x9; x1=x8;
  590. draw z1--z2--z3--cycle;  % diagonals
  591. draw z8--z9; % equal sign
  592. char_center(c); x.t=w-3u; y.t=y1+3u;
  593. char_negate(c,t,b);
  594. penlabels(1,2,3,8,9); endchar;
  595.  
  596. iff known n_triangle_right_eq_slant:
  597. cmchar "Not triangular greater than or (slanted) equal sign";
  598. compute_spread(.45x_height#,.55x_height#);
  599. spread#':=spread#; spread':=spread;
  600. compute_spread(5/4x_height#,3/2x_height#);
  601. beginchar(n_triangle_right_eq_slant,14u#,
  602.    v_center(spread#'+spread#+rule_thickness#+6u#));
  603. italcorr h#*slant-u#; adjust_fit(0,0); pickup rule.nib;
  604. rt x2=hround(w-1.5u)+eps; x1=x3=w-x2; y1-y3=spread;
  605. x2=x9; x1=x8;
  606. y2=.5[y1,y3]; y3-y8=y2-y9=spread'; top y1=h-3u;
  607. draw z1--z2--z3--cycle;  % diagonals
  608. draw z8--z9;
  609. char_center(c); x.t=w-3u; y.t=y1+3u;
  610. char_negate(c,t,b);
  611. penlabels(1,2,3,8,9); endchar;
  612.  
  613. iff known ll_floor:
  614. cmchar "Left merge or left double-floor";
  615. beginchar(ll_floor,10u#,body_height#,paren_depth#);
  616. adjust_fit(0,0); pickup rule.nib;
  617. compute_spread(.45x_height#,.55x_height#);
  618. x1=x2; top y1=h; .5[y1,y2]=math_axis;
  619. x4=x3; rt x5=rt x6=w; y5=y3=y1; y6=y4=y2;
  620. x3-x1=x5-x3=hround spread;
  621. draw z1--z2; draw z3--z4; % stems
  622. draw z2--z6; % horizontal
  623. labels(1,2,3,4,5,6); endchar;
  624.  
  625. iff known rr_floor:
  626. cmchar "Right merge or right double-floor";
  627. beginchar(rr_floor,10u#,body_height#,paren_depth#);
  628. adjust_fit(0,0); pickup rule.nib;
  629. compute_spread(.45x_height#,.55x_height#);
  630. x5=x6; top y1=h; .5[y1,y2]=math_axis;
  631. x4=x3; lft x1=lft x2=0; y5=y3=y1; y6=y4=y2;
  632. x3-x1=x5-x3=hround spread;
  633. draw z3--z4; draw z5--z6;  % stems
  634. draw z2--z6; % horizontal
  635. labels(1,2,3,4,5,6); endchar;
  636.  
  637. iff known ll_ceil:
  638. cmchar "Left double-ceiling";
  639. beginchar(ll_ceil,10u#,body_height#,paren_depth#);
  640. adjust_fit(0,0); pickup rule.nib;
  641. compute_spread(.45x_height#,.55x_height#);
  642. x1=x2; bot y1=-d; .5[y1,y2]=math_axis;
  643. x4=x3; rt x5=rt x6=w; y5=y3=y1; y6=y4=y2;
  644. x3-x1=x5-x3=hround spread;
  645. draw z1--z2; draw z3--z4; % stems
  646. draw z2--z6; % horizontal
  647. labels(1,2,3,4,5,6); endchar;
  648.  
  649. iff known rr_ceil:
  650. cmchar "Right double-ceiling";
  651. beginchar(rr_ceil,10u#,body_height#,paren_depth#);
  652. adjust_fit(0,0); pickup rule.nib;
  653. compute_spread(.45x_height#,.55x_height#);
  654. x5=x6; bot y1=-d; .5[y1,y2]=math_axis;
  655. x4=x3; lft x1=lft x2=0; y5=y3=y1; y6=y4=y2;
  656. x3-x1=x5-x3=hround spread;
  657. draw z3--z4; draw z5--z6;  % stems
  658. draw z2--z6; % horizontal
  659. labels(1,2,3,4,5,6); endchar;
  660.  
  661. iff known arrow_not:
  662. cmchar "Negated nonexistant arrow";
  663. compute_spread(.45x_height#,.55x_height#);
  664. beginchar(arrow_not,18u#,v_center(spread#+rule_thickness#));
  665. adjust_fit(0,0); pickup crisp.nib;
  666. y3=.24asc_height+eps+math_axis;
  667. char_center(100); top y101=top y3; x101=x100+2u;
  668. char_negate(100,101,102);
  669. zero_width; endchar;
  670.  
  671. iff known Arrow_not:
  672. cmchar "Negated nonexistant double arrow";
  673. compute_spread(.45x_height#,.55x_height#);
  674. beginchar(Arrow_not,18u#,v_center(spread#+rule_thickness#));
  675. adjust_fit(0,0); pickup rule.nib;
  676. y1-y2=spread; .5[y1,y2]=math_axis;
  677. y3=.24asc_height+eps+y1;
  678. char_center(100); top y101=top y3; x101=x100+1.5u; char_negate(100,101,102);
  679. zero_width; endchar;
  680.  
  681. iff known Maps_to_char:
  682. cmchar "Maps-To relation";
  683. compute_spread(.45x_height#,.55x_height#);
  684. beginchar(Maps_to_char,14u#,v_center(spread#+rule_thickness#));
  685. % this character should be followed immediately by equals or Rightarrow
  686. adjust_fit(0,0); pickup rule.nib;
  687. lft x1=hround u; x6=x2=x1+.5u; x3=x4=x5=x1;
  688. .5[y1,y5]=.5[y2,y6]=math_axis; y5-y3=y4-y1=.24asc_height+eps;
  689. y1-y5=y2-y6=spread;
  690. draw z3--z4;  % stem
  691. draw z1--z2;  % top bar stub
  692. draw z5--z6;  % bottom bar stub
  693. labels(1,2,3,4,5,6); zero_width; endchar;
  694.  
  695. iff known maps_from_char:
  696. cmchar "Maps-from relation";
  697. compute_spread(.45x_height#,.55x_height#);
  698. beginchar(maps_from_char,14u#,v_center(spread#+rule_thickness#));
  699. % this character should be preceded immediately by minus or leftarrow
  700. adjust_fit(0,0); pickup rule.nib;
  701. lft x1=hround u; x2=x1+.5u; x3=x4=x1;
  702. y1=y2=math_axis; y1-y3=y4-y1=.24asc_height+eps;
  703. draw z3--z4;  % stem
  704. draw z1--z2;  % bar stub
  705. zero_width;
  706. currentpicture:= currentpicture xscaled -1;
  707. endchar;
  708.  
  709. iff known Maps_from_char:
  710. cmchar "Maps-From relation";
  711. compute_spread(.45x_height#,.55x_height#);
  712. beginchar(Maps_from_char,14u#,v_center(spread#+rule_thickness#));
  713. % this character should be preceded immediately by equals or Rightarrow
  714. adjust_fit(0,0); pickup rule.nib;
  715. lft x1=hround u; x6=x2=x1+.5u; x3=x4=x5=x1;
  716. .5[y1,y5]=.5[y2,y6]=math_axis; y5-y3=y4-y1=.24asc_height+eps;
  717. y1-y5=y2-y6=spread;
  718. draw z3--z4;  % stem
  719. draw z1--z2;  % top bar stub
  720. draw z5--z6;  % bottom bar stub
  721. zero_width;
  722. currentpicture:= currentpicture xscaled -1;
  723. endchar;
  724.  
  725. iff known left_right_arrow_triangle:
  726. cmchar "Left-right arrow with triangular heads";
  727. beginchar(left_right_arrow_triangle,18u#,4u#+math_axis#,4u#-math_axis#);
  728. adjust_fit(0,0); pickup rule.nib;
  729. z1=z2 + whatever*(dir -150); y4=y1=math_axis;
  730. lft x1=hround u-eps; x4=x3=x2;
  731. top y2=h-u; bot y3=-d+u;
  732. z5=z6 + whatever*(dir 150); y8=y5=math_axis;
  733. rt x5=hround(w-u)+eps; x8=x7=x6;
  734. top y6=h-u; bot y7=-d+u;
  735. draw z1--z2--z3--cycle; % left head
  736. draw z5--z6--z7--cycle; % right head
  737. draw z4--z8; % stem
  738. labels(1,2,3,4,5); endchar;
  739.  
  740. iff known left_arrow_triangle:
  741. cmchar "Left arrow with triangular head";
  742. beginchar(left_arrow_triangle,18u#,4u#+math_axis#,4u#-math_axis#);
  743. adjust_fit(0,0); pickup rule.nib;
  744. rt x1=w-u; y1 = math_axis;
  745. z2=z3 + whatever*(dir -150); y5=y2=y1;
  746. lft x2=u; x5=x4=x3;
  747. top y3=h-u; bot y4=-d+u;
  748. draw z1--z5; draw z2--z3--z4--cycle;
  749. labels(1,2,3,4,5); endchar;
  750.  
  751. iff known right_arrow_triangle:
  752. cmchar "Right arrow with triangular head";
  753. beginchar(right_arrow_triangle,18u#,4u#+math_axis#,4u#-math_axis#);
  754. adjust_fit(0,0); pickup rule.nib;
  755. lft x1=u; y1 = math_axis;
  756. z2=z3 + whatever*(dir 150); y5=y2=y1;
  757. rt x2=w-u; x5=x4=x3;
  758. top y3=h-u; bot y4=-d+u;
  759. draw z1--z5; draw z2--z3--z4--cycle;
  760. labels(1,2,3,4,5); endchar;
  761.  
  762. iff known big_triangle_down:
  763. cmchar "\textstyle triangular join";
  764. beginchar(big_triangle_down,15u#,0,10/6dh#);
  765. adjust_fit(0,0); pickup pencircle scaled stem;
  766. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  767. top y1=eps; bot y3=-d; y5=y1;
  768. draw z1--z3--z5--cycle;  % diagonals
  769. labels(1,3,5); endchar;
  770.  
  771. iff known big_triangle_up:
  772. cmchar "\textstyle triangular meet";
  773. beginchar(big_triangle_up,15u#,0,10/6dh#);
  774. adjust_fit(0,0); pickup pencircle scaled stem;
  775. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  776. top y3=0; bot y1=-d-eps; y5=y1;
  777. draw z1--z3--z5--cycle;  % diagonals
  778. labels(1,3,5); endchar;
  779.  
  780. iff known big_curly_vee:
  781. cmchar "\textstyle big curly vee";
  782. beginchar(big_curly_vee,15u#,0,10/6dh#);
  783. adjust_fit(0,0); pickup pencircle scaled stem;
  784. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  785. top y1=eps; bot y3=-d; y5=y1;
  786. draw z1{dir -30}..{down}z3{up}..{dir 30}z5;  % diagonals
  787. labels(1,3,5); endchar;
  788.  
  789. iff known big_curly_wedge:
  790. cmchar "\textstyle big curly wedge";
  791. beginchar(big_curly_wedge,15u#,0,10/6dh#);
  792. adjust_fit(0,0); pickup pencircle scaled stem;
  793. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  794. top y3=0; bot y1=-d-eps; y5=y1;
  795. draw z1{dir 30}..{up}z3{down}..{dir -30}z5;  % diagonals
  796. labels(1,3,5); endchar;
  797.  
  798. iff known big_sq_cap:
  799. cmchar "\textstyle square set intersection sign";
  800. beginchar(big_sq_cap,15u#,0,10/6dh#);
  801. adjust_fit(0,0); pickup pencircle scaled stem;
  802. lft x1=hround u; x2=x1; x4=x5=w-x1;
  803. top y1=eps; bot y2=-d; y4=y2; y5=y1;
  804. draw z2---z1---z5---z4;  % stems and bar
  805. labels(1,2,4,5); endchar;
  806.  
  807. iff known big_box:
  808. cmchar "\textstyle box sign";
  809. beginchar(big_box,15u#,0,10/6dh#);
  810. adjust_fit(0,0); pickup pencircle scaled stem;
  811. lft x1=hround u; x2=x1; x4=x5=w-x1;
  812. top y1=eps; bot y2=-d; y4=y2; y5=y1;
  813. draw z1---z2---z4---z5---cycle;  % stems and bar
  814. labels(1,2,4,5); endchar;
  815.  
  816. iff known big_parallel:
  817. cmchar "\textstyle big parallelism sign";
  818. beginchar(big_parallel,8u#,0,10/6dh#);
  819. adjust_fit(0,0); pickup pencircle scaled stem;
  820. lft x1=hround u; x2=x1; x4=x5=w-x1;
  821. top y1=eps; bot y2=-d; y4=y2; y5=y1;
  822. draw z1---z2;  % left line
  823. draw z4---z5;  % right line
  824. labels(1,2,4,5); endchar;
  825.  
  826. iff known big_interleave:
  827. cmchar "\textstyle big interleaving sign";
  828. beginchar(big_interleave,9u#,0,10/6dh#);
  829. adjust_fit(u#,u#); pickup pencircle scaled stem;
  830. lft x1=hround 0; x2=x1;
  831. top y1=eps; bot y2=-d;
  832. x4=x5=x1+2hround(.5w);
  833. y4=y1;y5=y2;
  834. x6=x7=x1+hround(.5w);
  835. y6=y1;y7=y2;
  836. draw z1---z2;  % left line
  837. draw z4---z5;  % right line
  838. draw z6---z7;  % middle line
  839. labels(1,2,4,5,6,7); endchar;
  840.  
  841. iff known big_triangle_down:
  842. cmchar "\displaystyle triangular join";
  843. beginchar(big_triangle_down+8,20u#,0,14/6dh#); padded 1/6dh#;
  844. adjust_fit(0,0); pickup pencircle scaled curve;
  845. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  846. top y1=eps; bot y3=-d; y5=y1;
  847. draw z1--z3--z5--cycle;  % diagonals
  848. labels(1,3,5); endchar;
  849.  
  850. iff known big_triangle_up:
  851. cmchar "\displaystyle triangular meet";
  852. beginchar(big_triangle_up+8,20u#,0,14/6dh#); padded 1/6dh#;
  853. adjust_fit(0,0); pickup pencircle scaled curve;
  854. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  855. top y3=0; bot y1=-d-eps; y5=y1;
  856. draw z1--z3--z5--cycle;  % diagonals
  857. labels(1,3,5); endchar;
  858.  
  859. iff known big_curly_vee:
  860. cmchar "\displaystyle big curly vee";
  861. beginchar(big_curly_vee+8,20u#,0,14/6dh#); padded 1/6dh#;
  862. adjust_fit(0,0); pickup pencircle scaled curve;
  863. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  864. top y1=eps; bot y3=-d; y5=y1;
  865. draw z1{dir -30}..{down}z3{up}..{dir 30}z5;  % diagonals
  866. labels(1,3,5); endchar;
  867.  
  868. iff known big_curly_wedge:
  869. cmchar "\displaystyle big curly wedge";
  870. beginchar(big_curly_wedge+8,20u#,0,14/6dh#); padded 1/6dh#;
  871. adjust_fit(0,0); pickup pencircle scaled curve;
  872. lft x1=hround u-eps; x3=w-x3; x5=w-x1;
  873. top y3=0; bot y1=-d-eps; y5=y1;
  874. draw z1{dir 30}..{up}z3{down}..{dir -30}z5;  % diagonals
  875. labels(1,3,5); endchar;
  876.  
  877. iff known big_sq_cap:
  878. cmchar "\displaystyle square set union sign";
  879. beginchar(big_sq_cap+8,20u#,0,14/6dh#); padded 1/6dh#;
  880. adjust_fit(0,0); pickup pencircle scaled curve;
  881. lft x1=hround u; x2=x1; x4=x5=w-x1;
  882. top y1=eps; bot y2=-d; y4=y2; y5=y1;
  883. draw z2---z1---z5---z4;  % stems and bar
  884. labels(1,2,4,5); endchar;
  885.  
  886. iff known big_box:
  887. cmchar "\displaystyle box sign";
  888. beginchar(big_box+8,20u#,0,14/6dh#); padded 1/6dh#;
  889. adjust_fit(0,0); pickup pencircle scaled curve;
  890. lft x1=hround u; x2=x1; x4=x5=w-x1;
  891. top y1=eps; bot y2=-d; y4=y2; y5=y1;
  892. draw z1---z2---z4---z5---cycle;  % stems and bar
  893. labels(1,2,4,5); endchar;
  894.  
  895. iff known big_parallel:
  896. cmchar "\displaystyle big parallelism sign";
  897. beginchar(big_parallel+8,10u#,0,14/6dh#); padded 1/6dh#;
  898. adjust_fit(0,0); pickup pencircle scaled curve;
  899. lft x1=hround u; x2=x1; x4=x5=w-x1;
  900. top y1=eps; bot y2=-d; y4=y2; y5=y1;
  901. draw z1---z2;  % left line
  902. draw z4---z5;  % right line
  903. labels(1,2,4,5); endchar;
  904.  
  905. iff known big_interleave:
  906. cmchar "\displaystyle big interleaving sign";
  907. beginchar(big_interleave+8,13u#,0,14/6dh#); padded 1/6dh#;
  908. adjust_fit(u#,u#); pickup pencircle scaled curve;
  909. lft x1=hround 0; x2=x1;
  910. top y1=eps; bot y2=-d;
  911. x4=x5=x1+2hround(.5w);
  912. y4=y1;y5=y2;
  913. x6=x7=x1+hround(.5w);
  914. y6=y1;y7=y2;
  915. draw z1---z2;  % left line
  916. draw z4---z5;  % right line
  917. draw z6---z7;  % middle line
  918. labels(1,2,4,5,6,7); endchar;
  919.  
  920. iff known big_n_plus:
  921. cmchar "\textstyle multiset intersection sign";
  922. beginchar(big_n_plus,15u#,0,10/6dh#);
  923. adjust_fit(0,0); pickup pencircle scaled stem;
  924. lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
  925. top y3=0; bot y1=-d-eps; y2=y4=2/3[y1,y3]; y5=y1;
  926. draw z1---z2...z3...z4---z5;  % stems and cap
  927. y8=y9=.47[y1,y3]; x8=w-x9=x1+2stem+eps; x6=x7=x3;
  928. .5[y6,y7]=y8; y7-y6=x9-x8; draw z8--z9; draw z6--z7;  % enclosed `$+$'
  929. labels(1,2,3,4,5,6,7,8,9); endchar;
  930.  
  931. iff known big_ll_bracket:
  932. cmchar "\big left semantic bracket";
  933. beginchar(big_ll_bracket,8u#,rule_thickness#,2dh#-rule_thickness#);
  934. adjust_fit(1.5u#,0); left_semantic_bracket(rule_thickness,true,true); endchar;
  935.  
  936. iff known big_ll_bracket:
  937. cmchar "\Big left semantic bracket";
  938. beginchar(big_ll_bracket+1,8.5u#,rule_thickness#,3dh#-rule_thickness#);
  939. adjust_fit(2u#,0); left_semantic_bracket(.25[rule_thickness,stem],true,true); endchar;
  940.  
  941. iff known big_ll_bracket:
  942. cmchar "\bigg left semantic bracket";
  943. beginchar(big_ll_bracket+2,9u#,rule_thickness#,4dh#-rule_thickness#);
  944. adjust_fit(2.5u#,0); left_semantic_bracket(.5[rule_thickness,stem],true,true); endchar;
  945.  
  946. iff known big_ll_bracket:
  947. cmchar "\Bigg left semantic bracket";
  948. beginchar(big_ll_bracket+3,9.5u#,rule_thickness#,5dh#-rule_thickness#);
  949. adjust_fit(3u#,0); left_semantic_bracket(.75[rule_thickness,stem],true,true); endchar;
  950.  
  951. iff known big_ll_bracket:
  952. cmchar "Extensible left semantic bracket---top";
  953. beginchar(big_ll_bracket+4,10u#,rule_thickness#,3dh#-rule_thickness#);
  954. adjust_fit(4u#,0); pickup crisp.nib;
  955. pos1(stem,0); pos2(stem,0);
  956. top y1=h-1; y2=-d-eps; lft x1l=lft x2l=hround(2.5u-.5stem);
  957. filldraw stroke z1e--z2e;  % stem1
  958. pos3(stem,90); pos4(stem,90);
  959. x3=x1l; rt x4=hround(w-.75u+.5stem); y3r=y4r=y1;
  960. filldraw stroke z3e--z4e;  % upper bar
  961. pos7(stem,0); pos8(stem,0);
  962. y7=y1; y8=y2; x7=x8=0.5(x1+x4);
  963. filldraw stroke z7e--z8e;  % stem2
  964. penlabels(1,2,3,4,7,8); endchar;
  965.  
  966. iff known big_ll_bracket:
  967. cmchar "Extensible left semantic bracket---bottom";
  968. beginchar(big_ll_bracket+5,10u#,rule_thickness#,3dh#-rule_thickness#);
  969. adjust_fit(4u#,0); pickup crisp.nib;
  970. pos1(stem,0); pos2(stem,0);
  971. y1=h+eps; bot y2=1-d; lft x1l=lft x2l=hround(2.5u-.5stem);
  972. filldraw stroke z1e--z2e;  % stem1
  973. pos5(stem,90); pos6(stem,90);
  974. x5=x1l; rt x6=hround(w-.75u+.5stem); y5l=y6l=y2;
  975. filldraw stroke z5e--z6e;  % lower bar
  976. pos7(stem,0); pos8(stem,0);
  977. y7=y1; y8=y2; x7=x8=0.5(x1+x6);
  978. filldraw stroke z7e--z8e;  % stem2
  979. penlabels(1,2,5,6); endchar;
  980.  
  981. iff known big_ll_bracket:
  982. cmchar "Extensible left semantic bracket---extension module";
  983. beginchar(big_ll_bracket+6,10u#,0,dh#);
  984. adjust_fit(4u#,0); pickup crisp.nib;
  985. pos1(stem,0); pos2(stem,0);
  986. y1=h+1+eps; bot y2=-d-1-eps; lft x1l=lft x2l=hround(2.5u-.5stem);
  987. filldraw stroke z1e--z2e;  % stem1
  988. rt x6=hround(w-.75u+.5stem);
  989. pos7(stem,0); pos8(stem,0);
  990. y7=y1; y8=y2; x7=x8=0.5(x1+x6);
  991. filldraw stroke z7e--z8e;  % stem2
  992. penlabels(1,2,7,8); endchar;
  993.  
  994. iff known big_n_plus:
  995. cmchar "\displaystyle multiset intersection sign";
  996. beginchar(big_n_plus+8,20u#,0,14/6dh#); padded 1/6dh#;
  997. adjust_fit(0,0); pickup pencircle scaled curve;
  998. lft x1=hround u; x2=x1; x3=w-x3; x4=x5=w-x1;
  999. top y3=0; bot y1=-d-eps; y2=y4=2/3[y1,y3]; y5=y1;
  1000. draw z1---z2...z3...z4---z5;  % stems and cap
  1001. y8=y9=.47[y1,y3]; x8=w-x9=x1+2curve+eps; x6=x7=x3;
  1002. .5[y6,y7]=y8; y7-y6=x9-x8; draw z8--z9; draw z6--z7;  % enclosed `$+$'
  1003. labels(1,2,3,4,5,6,7,8,9); endchar;
  1004.  
  1005. iff known big_rr_bracket:
  1006. cmchar "\big right semantic bracket";
  1007. beginchar(big_rr_bracket,8u#,rule_thickness#,2dh#-rule_thickness#);
  1008. adjust_fit(0,1.5u#); right_semantic_bracket(rule_thickness,true,true); endchar;
  1009.  
  1010. iff known big_rr_bracket:
  1011. cmchar "\Big right semantic bracket";
  1012. beginchar(big_rr_bracket+1,8.5u#,rule_thickness#,3dh#-rule_thickness#);
  1013. adjust_fit(0,2u#); right_semantic_bracket(.25[rule_thickness,stem],true,true); endchar;
  1014.  
  1015. iff known big_rr_bracket:
  1016. cmchar "\bigg right semantic bracket";
  1017. beginchar(big_rr_bracket+2,9u#,rule_thickness#,4dh#-rule_thickness#);
  1018. adjust_fit(0,2.5u#); right_semantic_bracket(.5[rule_thickness,stem],true,true); endchar;
  1019.  
  1020. iff known big_rr_bracket:
  1021. cmchar "\Bigg right semantic bracket";
  1022. beginchar(big_rr_bracket+3,9.5u#,rule_thickness#,5dh#-rule_thickness#);
  1023. adjust_fit(0,3u#); right_semantic_bracket(.75[rule_thickness,stem],true,true); endchar;
  1024.  
  1025. iff known big_rr_bracket:
  1026. cmchar "Extensible right semantic bracket---top";
  1027. beginchar(big_rr_bracket+4,10u#,rule_thickness#,3dh#-rule_thickness#);
  1028. adjust_fit(0,4u#); pickup crisp.nib;
  1029. pos1(stem,0); pos2(stem,0);
  1030. top y1=h-1; y2=-d-eps; rt x1r=rt x2r=hround(w-2.5u+.5stem);
  1031. filldraw stroke z1e--z2e;  % stem1
  1032. pos3(stem,90); pos4(stem,90);
  1033. x3=x1r; lft x4=hround(.75u-.5stem); y3r=y4r=y1;
  1034. filldraw stroke z3e--z4e;  % upper bar
  1035. pos7(stem,0); pos8(stem,0);
  1036. y7=y1; y8=y2; x7=x8=0.5(x1+x4);
  1037. filldraw stroke z7e--z8e;  % stem2
  1038. penlabels(1,2,3,4,7,8); endchar;
  1039.  
  1040. iff known big_rr_bracket:
  1041. cmchar "Extensible right semantic bracket---bottom";
  1042. beginchar(big_rr_bracket+5,10u#,rule_thickness#,3dh#-rule_thickness#);
  1043. adjust_fit(0,4u#); pickup crisp.nib;
  1044. pos1(stem,0); pos2(stem,0);
  1045. y1=h+eps; bot y2=1-d; rt x1r=rt x2r=hround(w-2.5u+.5stem);
  1046. filldraw stroke z1e--z2e;  % stem1
  1047. pos5(stem,90); pos6(stem,90);
  1048. x5=x1r; lft x6=hround(.75u-.5stem); y5l=y6l=y2;
  1049. filldraw stroke z5e--z6e;  % lower bar
  1050. pos7(stem,0); pos8(stem,0);
  1051. y7=y1; y8=y2; x7=x8=0.5(x1+x6);
  1052. filldraw stroke z7e--z8e;  % stem2
  1053. penlabels(1,2,5,6,7,8); endchar;
  1054.  
  1055. iff known big_rr_bracket:
  1056. cmchar "Extensible right semantic bracket---extension module";
  1057. beginchar(big_rr_bracket+6,10u#,0,dh#);
  1058. adjust_fit(0,4u#); pickup crisp.nib;
  1059. pos1(stem,0); pos2(stem,0);
  1060. y1=h+1+eps; bot y2=-d-1-eps; rt x1r=rt x2r=hround(w-2.5u+.5stem);
  1061. filldraw stroke z1e--z2e;  % stem1
  1062. lft x6=hround(.75u-.5stem);
  1063. pos7(stem,0); pos8(stem,0);
  1064. y7=y1; y8=y2; x7=x8=0.5(x1+x6);
  1065. filldraw stroke z7e--z8e;  % stem2
  1066. penlabels(1,2,7,8); endchar;
  1067.